# -*- coding: utf-8 -*-
# @Time: 2021/9/28 16:49
# @Author: yh
# @Remark: 视频概览View层
from mxsoftpy import View

from server.common.VideoManage.VideoQuality.video_overview import VideoOverviewServer


class DeviceOverview(View):
    def post(self):
        """
        设备概览
        """
        return '查询设备概览成功', VideoOverviewServer().device_overview()


class FaultDeviceType(View):
    def post(self):
        """
        故障类型占比
        """
        return '查询故障类型占比成功', VideoOverviewServer().fault_device_type()


class FaultTrendWeek(View):
    def post(self):
        """
        本周故障设备趋势
        """
        return '查询本周故障设备趋势成功', VideoOverviewServer().fault_trend_week()


class FaultDeviceStatistc(View):
    def post(self):
        """
        故障设备统计
        """
        return '查询故障设备统计成功',VideoOverviewServer().fault_device_statistic()


class FaultTypeStatistc(View):
    def post(self):
        """
        故障类型统计
        """
        return '查询故障类型统计成功',VideoOverviewServer().fault_type_statistic()

